import service from "../utils/service";
// 封装相关数据请求

let Link = (url, method = "get", data, params) => {
    return new Promise((resolve, reject) => {
        //执行的异步操作
        service.request({
            url,
            method,
            data,
            params
        }).then((ok) => {
            //成功后的操作
            resolve(ok)
        }).catch((err) => {
            //失败后的操作
            reject(err)
        })
    })
}




export default Link